package com.eatrip.service.implementation;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eatrip.bean.EventoLocale;
import com.eatrip.dao.EventiLocaleDAO;
import com.eatrip.service.EventiLocaleService;

@Service
public class EventiLocaleServiceImple implements EventiLocaleService {

	@Autowired
	private EventiLocaleDAO eventiLocaleDAO;
	
	@Override
	@Transactional(readOnly=true)
	public EventoLocale getEventoLocale(int idEventoLocale) {
		return eventiLocaleDAO.getEventoLocale(idEventoLocale);
	}

	@Override
	@Transactional(readOnly=true)
	public List<EventoLocale> getEventiLocaleByIdLocale(int idLocale,
			int start, int numRow) {
		return eventiLocaleDAO.getEventiLocaleByIdLocale(idLocale, start, numRow);
	}

	@Override
	@Transactional(readOnly=true)
	public List<EventoLocale> getEventiLocaleByDataInizio(Date dataInizio,
			int start, int numRow) {
		return eventiLocaleDAO.getEventiLocaleByDataInizio(dataInizio, start, numRow);
	}

	@Override
	@Transactional(readOnly=true)
	public List<EventoLocale> getAllEventiLocali(int start, int numRow) {
		return eventiLocaleDAO.getAllEventiLocali(start, numRow);
	}

	@Override
	@Transactional(readOnly=false)
	public void insertEventoLocale(EventoLocale eventoLocale) {
		eventiLocaleDAO.insertEventoLocale(eventoLocale);
	}

	@Override
	@Transactional(readOnly=false)
	public void updateEventoLocale(EventoLocale eventoLocale) {
		eventiLocaleDAO.updateEventoLocale(eventoLocale);
	}

	@Override
	@Transactional(readOnly=false)
	public void deleteEventoLocale(EventoLocale eventoLocale) {
		eventiLocaleDAO.deleteEventoLocale(eventoLocale);
	}

	@Override
	@Transactional(readOnly=false)
	public void deleteEventiLocaleByIdLocale(int idLocale) {
		eventiLocaleDAO.deleteEventiLocaleByIdLocale(idLocale);
	}

	@Override
	@Transactional(readOnly=false)
	public void deleteAllEventiLocali() {
		eventiLocaleDAO.deleteAllEventiLocali();
	}

}
